<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=0,user-scalable=0">
[#include "/wap/include/static.html"]
    <link rel="stylesheet" href="${path}/resources/wap/css/me/changePassword.css"/>
</head>
<body>
<!--头部-->
<div id="header"  onclick="window.location.href='${path}/wap/member'" >
    <div class="left">
        <img id="goBack" src="${path}/resources/wap/img/invest/back.png">
    </div>
    <div class="center">
        修改密码
    </div>
</div>
<!--输入框-->
<form class="layui-form">
<div id="matter">

    <div class="matter-option">

        <input type="hidden" name="type" value="${type}">
        <label for="name"><img src="${path}/resources/wap/img/me/lock.png" alt="图片"/></label><input id="name" name="oldpass" type="password" placeholder="请输入原密码">
    </div>
    <div class="matter-option">
        <label for="psd"><img src="${path}/resources/wap/img/me/lock.png" alt="图片"/></label><input id="psd" name="pass1"  type="password" placeholder="请输入新密码:6-12位字母和数字">
    </div>
    <div class="matter-option">
        <label for="psdT"><img src="${path}/resources/wap/img/me/lock.png" alt="图片"/></label><input id="psdT" name="pass2"  type="password" placeholder="请确认新密码:6-12位字母和数字">
    </div>
    </div>
</div>
<!--按钮-->
<div class="type-one">
    <button  lay-submit lay-filter="MainForm">确定</button>
</div>
    [#if type=='deal']
        <div class="forget-psd">
            <a href="${path}/wap/forget/deal">忘记交易密码？</a>
        </div>
    [/#if]
</form>


<style>
    .forget-psd {
        height: 1.664rem;
        line-height: 1.664rem;
        font-size: 0.64rem;
        color: #54bdff;
        margin-left: 0.512rem;
        width: 14.976rem;
        text-align: right; }
    .forget-psd a {
        text-decoration: none; }

</style>


<script type="text/javascript">



    layui.use(['form', 'layer'], function () {
        var form = layui.form(), $ = layui.jquery, layer = layui.layer;
        form.on('submit(MainForm)', function (data) {
            var index = layer.load();
            ajax({
                url: "${path}/wap/member/pwdmodify",
                data: data.field,
                success: function (result) {
                    layer.msg(result.content, function () {
                        location.reload();
                    });
                    layer.close(index);
                },
                complete: function () {
                    layer.close(index);
                }, error: function () {
                    layer.close(index);
                }

            });
            return false;
        });


    });
</script>

</body>

</html>